package com.kingmed.kmss.common.dto.admin.ums;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 用于微服务架构下统一认证的dto
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
public class AdminAuthDTO {

    private Long id;
    private String username;
    private String password;
    private String avatar;

    private String employeeNum;
    private Long userId;
    private Long orgId;
    private String orgName;
    private String token;
    private String userType;
    private Long loginTime;
    private Long expireTime;
    private String ipaddr;
    private String loginLocation;
    private String browser;
    private String os;

    @ApiModelProperty("直属上级")
    private String directLeader;

    @ApiModelProperty("所有上级")
    private String directLeaders;

    @ApiModelProperty("用户所属组织（来源HR）")
    private String orgFullName;

    @ApiModelProperty("手机")
    private String phone;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("备注信息")
    private String remark;

    /**
     * 用户状态
     * ("001", "在职")
     * ("002", "不在职")
     * ("003", "离职")
     * ("004", "离退休")
     * ("005", "返聘")
     * ("006", "试用")
     */
    @ApiModelProperty("用户状态")
    private String empStatus;

    @ApiModelProperty("用户来源（oa为oa用户,crm为crm自建用户）")
    private String userSource;

    /////////// 默认空数组，前端使用
    //resource string list
    private List<String> resourceList = new ArrayList<>();

    //role string  list
    private List<String> roleList = new ArrayList<>();

    //menu string  list
    private List<String> menuList = new ArrayList<>();

    // 组织部门 （暂定一个用户一个组织部门）
    private List<String> orgList = new ArrayList<>();

    /**
     * 一个用户可能有多个权限
     */
    private List<RoleDTO> roles = new ArrayList<>();

    private List<MenuDTO> menus = new ArrayList<>();

    private List<MenuNodeDTO> menusTree = new ArrayList<>();

    private List<ResourceDTO> resources = new ArrayList<>();

    private List<OrganizationDTO> orgs = new ArrayList<>();

    private Long roleId;
}
